﻿#ifndef MYMUSIC_H
#define MYMUSIC_H

#include <QWidget>
#include "volumetool.h"
#include "musiclist.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MyMusic; }
QT_END_NAMESPACE

class MyMusic : public QWidget
{
    Q_OBJECT

public:
    MyMusic(QWidget *parent = nullptr);
    ~MyMusic();

    void initui();

    bool eventFilter(QObject* watched, QEvent* event);

    void connectSignalAndSlots();

    QJsonArray randomPiction();
private slots:
    void Quit();
    
    void onBtFromClick(int pageId);

    void miniWindows();

    void maxWindows();

    void adjustVolume();

    void addLocalMusic();
private:
    Ui::MyMusic *ui;

    QPoint dragPosition;

    VolumeTool* volumeTool;

    MusicList musicList;
};
#endif // MYMUSIC_H
